3.2.42 \(\int \frac {\sec ^5(c+d x)}{(a+i a \tan (c+d x))^3} \, dx\) [142]

Optimal. Leaf size=65 \[ -\frac {3 \tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {3 i \sec (c+d x)}{a^3 d}+\frac {2 i \sec ^3(c+d x)}{a d (a+i a \tan (c+d x))^2} \]

[Out]

-3*arctanh(sin(d*x+c))/a^3/d+3*I*sec(d*x+c)/a^3/d+2*I*sec(d*x+c)^3/a/d/(a+I*a*tan(d*x+c))^2

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3581, 3582, 3855} \begin {gather*} \frac {3 i \sec (c+d x)}{a^3 d}-\frac {3 \tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {2 i \sec ^3(c+d x)}{a d (a+i a \tan (c+d x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^5/(a + I*a*Tan[c + d*x])^3,x]

[Out]

(-3*ArcTanh[Sin[c + d*x]])/(a^3*d) + ((3*I)*Sec[c + d*x])/(a^3*d) + ((2*I)*Sec[c + d*x]^3)/(a*d*(a + I*a*Tan[c
 + d*x])^2)

Rule 3581

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[2*d^2*
(d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + f*x])^(n + 1)/(b*f*(m + 2*n))), x] - Dist[d^2*((m - 2)/(b^2*(m + 2*n)
)), Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a
^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (Integers
Q[n, m + 1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]

Rule 3582

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d^2*(
d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + f*x])^(n + 1)/(b*f*(m + n - 1))), x] + Dist[d^2*((m - 2)/(a*(m + n - 1
))), Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2
 + b^2, 0] && LtQ[n, 0] && GtQ[m, 1] &&  !ILtQ[m + n, 0] && NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\sec ^5(c+d x)}{(a+i a \tan (c+d x))^3} \, dx &=\frac {2 i \sec ^3(c+d x)}{a d (a+i a \tan (c+d x))^2}-\frac {3 \int \frac {\sec ^3(c+d x)}{a+i a \tan (c+d x)} \, dx}{a^2}\\ &=\frac {3 i \sec (c+d x)}{a^3 d}+\frac {2 i \sec ^3(c+d x)}{a d (a+i a \tan (c+d x))^2}-\frac {3 \int \sec (c+d x) \, dx}{a^3}\\ &=-\frac {3 \tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {3 i \sec (c+d x)}{a^3 d}+\frac {2 i \sec ^3(c+d x)}{a d (a+i a \tan (c+d x))^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.38, size = 108, normalized size = 1.66 \begin {gather*} \frac {\sec ^3(c+d x) (i \cos (d x)-\sin (d x))^3 \left (6 \tanh ^{-1}\left (\sin (c)+\cos (c) \tan \left (\frac {d x}{2}\right )\right ) (\cos (3 c)+i \sin (3 c))+(\cos (2 c-d x)+i \sin (2 c-d x)) (-5 i+\tan (c+d x))\right )}{a^3 d (-i+\tan (c+d x))^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^5/(a + I*a*Tan[c + d*x])^3,x]

[Out]

(Sec[c + d*x]^3*(I*Cos[d*x] - Sin[d*x])^3*(6*ArcTanh[Sin[c] + Cos[c]*Tan[(d*x)/2]]*(Cos[3*c] + I*Sin[3*c]) + (
Cos[2*c - d*x] + I*Sin[2*c - d*x])*(-5*I + Tan[c + d*x])))/(a^3*d*(-I + Tan[c + d*x])^3)

________________________________________________________________________________________

Maple [A]
time = 0.28, size = 86, normalized size = 1.32

method result size
derivativedivides \(\frac {-\frac {i}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\frac {2 i}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2}-3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\frac {8}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a^{3} d}\) \(86\)
default \(\frac {-\frac {i}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\frac {2 i}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2}-3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\frac {8}{-i+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a^{3} d}\) \(86\)
risch \(\frac {4 i {\mathrm e}^{-i \left (d x +c \right )}}{a^{3} d}+\frac {2 i {\mathrm e}^{i \left (d x +c \right )}}{d \,a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a^{3} d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a^{3} d}\) \(93\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^5/(a+I*a*tan(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

2/d/a^3*(-1/2*I/(tan(1/2*d*x+1/2*c)-1)+3/2*ln(tan(1/2*d*x+1/2*c)-1)+1/2*I/(tan(1/2*d*x+1/2*c)+1)-3/2*ln(tan(1/
2*d*x+1/2*c)+1)+4/(-I+tan(1/2*d*x+1/2*c)))

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 319 vs. \(2 (59) = 118\).
time = 0.52, size = 319, normalized size = 4.91 \begin {gather*} \frac {6 \, {\left (\cos \left (3 \, d x + 3 \, c\right ) + \cos \left (d x + c\right ) + i \, \sin \left (3 \, d x + 3 \, c\right ) + i \, \sin \left (d x + c\right )\right )} \arctan \left (\cos \left (d x + c\right ), \sin \left (d x + c\right ) + 1\right ) + 6 \, {\left (\cos \left (3 \, d x + 3 \, c\right ) + \cos \left (d x + c\right ) + i \, \sin \left (3 \, d x + 3 \, c\right ) + i \, \sin \left (d x + c\right )\right )} \arctan \left (\cos \left (d x + c\right ), -\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (i \, \cos \left (3 \, d x + 3 \, c\right ) + i \, \cos \left (d x + c\right ) - \sin \left (3 \, d x + 3 \, c\right ) - \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (-i \, \cos \left (3 \, d x + 3 \, c\right ) - i \, \cos \left (d x + c\right ) + \sin \left (3 \, d x + 3 \, c\right ) + \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) + 1\right ) + 12 \, \cos \left (2 \, d x + 2 \, c\right ) + 12 i \, \sin \left (2 \, d x + 2 \, c\right ) + 8}{-2 \, {\left (i \, a^{3} \cos \left (3 \, d x + 3 \, c\right ) + i \, a^{3} \cos \left (d x + c\right ) - a^{3} \sin \left (3 \, d x + 3 \, c\right ) - a^{3} \sin \left (d x + c\right )\right )} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5/(a+I*a*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

(6*(cos(3*d*x + 3*c) + cos(d*x + c) + I*sin(3*d*x + 3*c) + I*sin(d*x + c))*arctan2(cos(d*x + c), sin(d*x + c)
+ 1) + 6*(cos(3*d*x + 3*c) + cos(d*x + c) + I*sin(3*d*x + 3*c) + I*sin(d*x + c))*arctan2(cos(d*x + c), -sin(d*
x + c) + 1) + 3*(I*cos(3*d*x + 3*c) + I*cos(d*x + c) - sin(3*d*x + 3*c) - sin(d*x + c))*log(cos(d*x + c)^2 + s
in(d*x + c)^2 + 2*sin(d*x + c) + 1) + 3*(-I*cos(3*d*x + 3*c) - I*cos(d*x + c) + sin(3*d*x + 3*c) + sin(d*x + c
))*log(cos(d*x + c)^2 + sin(d*x + c)^2 - 2*sin(d*x + c) + 1) + 12*cos(2*d*x + 2*c) + 12*I*sin(2*d*x + 2*c) + 8
)/((-2*I*a^3*cos(3*d*x + 3*c) - 2*I*a^3*cos(d*x + c) + 2*a^3*sin(3*d*x + 3*c) + 2*a^3*sin(d*x + c))*d)

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 112, normalized size = 1.72 \begin {gather*} -\frac {3 \, {\left (e^{\left (3 i \, d x + 3 i \, c\right )} + e^{\left (i \, d x + i \, c\right )}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 3 \, {\left (e^{\left (3 i \, d x + 3 i \, c\right )} + e^{\left (i \, d x + i \, c\right )}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 6 i \, e^{\left (2 i \, d x + 2 i \, c\right )} - 4 i}{a^{3} d e^{\left (3 i \, d x + 3 i \, c\right )} + a^{3} d e^{\left (i \, d x + i \, c\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5/(a+I*a*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

-(3*(e^(3*I*d*x + 3*I*c) + e^(I*d*x + I*c))*log(e^(I*d*x + I*c) + I) - 3*(e^(3*I*d*x + 3*I*c) + e^(I*d*x + I*c
))*log(e^(I*d*x + I*c) - I) - 6*I*e^(2*I*d*x + 2*I*c) - 4*I)/(a^3*d*e^(3*I*d*x + 3*I*c) + a^3*d*e^(I*d*x + I*c
))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {i \int \frac {\sec ^{5}{\left (c + d x \right )}}{\tan ^{3}{\left (c + d x \right )} - 3 i \tan ^{2}{\left (c + d x \right )} - 3 \tan {\left (c + d x \right )} + i}\, dx}{a^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**5/(a+I*a*tan(d*x+c))**3,x)

[Out]

I*Integral(sec(c + d*x)**5/(tan(c + d*x)**3 - 3*I*tan(c + d*x)**2 - 3*tan(c + d*x) + I), x)/a**3

________________________________________________________________________________________

Giac [A]
time = 0.73, size = 110, normalized size = 1.69 \begin {gather*} -\frac {\frac {3 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{3}} - \frac {3 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{3}} - \frac {2 \, {\left (4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 5\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )} a^{3}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5/(a+I*a*tan(d*x+c))^3,x, algorithm="giac")

[Out]

-(3*log(tan(1/2*d*x + 1/2*c) + 1)/a^3 - 3*log(tan(1/2*d*x + 1/2*c) - 1)/a^3 - 2*(4*tan(1/2*d*x + 1/2*c)^2 - I*
tan(1/2*d*x + 1/2*c) - 5)/((tan(1/2*d*x + 1/2*c)^3 - I*tan(1/2*d*x + 1/2*c)^2 - tan(1/2*d*x + 1/2*c) + I)*a^3)
)/d

________________________________________________________________________________________

Mupad [B]
time = 3.77, size = 105, normalized size = 1.62 \begin {gather*} -\frac {6\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d}-\frac {\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^3}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,8{}\mathrm {i}}{a^3}-\frac {10{}\mathrm {i}}{a^3}}{d\,\left (-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,1{}\mathrm {i}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^5*(a + a*tan(c + d*x)*1i)^3),x)

[Out]

- (6*atanh(tan(c/2 + (d*x)/2)))/(a^3*d) - ((tan(c/2 + (d*x)/2)^2*8i)/a^3 - 10i/a^3 + (2*tan(c/2 + (d*x)/2))/a^
3)/(d*(tan(c/2 + (d*x)/2)*1i - tan(c/2 + (d*x)/2)^2 - tan(c/2 + (d*x)/2)^3*1i + 1))

________________________________________________________________________________________